//判断注册是否成功
function register_click(){
    //获取用户输入的信息
    let email1 = document.getElementById("email").value;
    let password1 = document.getElementById("password").value;
    let username1 = document.getElementById("username").value;

    ajax({
        type:"post",
        url:"../../sign",
        data:{
            name:username1,
            email:email1,
            password:password1,
        },
        success:function (result){
            alert("注册成功");
            console.log(result);
            window.location.href="./Login.html";
        },
        error:function (result){
            alert("注册失败，请重新检查输入信息");
            console.log(result);
            window.location.href="./Sign.html";
        }
    })
}